<template>
  <div>
    Text in vue: {{ username }}
    {{model.name}}
    <input type="text" @input="onInput" /> 
  </div>
</template>

<script>
  import Vue from 'vue';
  import { Observer } from 'mobx-vue';
  import Component from 'vue-class-component';
  import Model from './model';

  @Component({
    props: {
      username: {
        type: String
      }
    }
  })
  export default class TextVue extends Vue {
    model = Model
    onInput($event) {
      Model.changeName($event.target.value);
      // this.$forceUpdate();
    }
  }
</script>
